3.7 \(\int \frac {\sec ^3(x)}{i+\cot (x)} \, dx\)

Optimal. Leaf size=22 \[ \sec (x)+\frac {1}{2} i \tanh ^{-1}(\sin (x))-\frac {1}{2} i \tan (x) \sec (x) \]

[Out]

1/2*I*arctanh(sin(x))+sec(x)-1/2*I*sec(x)*tan(x)

________________________________________________________________________________________

Rubi [A]  time = 0.15, antiderivative size = 22, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.538, Rules used = {3518, 3108, 3107, 2606, 8, 2611, 3770} \[ \sec (x)+\frac {1}{2} i \tanh ^{-1}(\sin (x))-\frac {1}{2} i \tan (x) \sec (x) \]

Antiderivative was successfully verified.

[In]

Int[Sec[x]^3/(I + Cot[x]),x]

[Out]

(I/2)*ArcTanh[Sin[x]] + Sec[x] - (I/2)*Sec[x]*Tan[x]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 2606

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[a/f, Subst[
Int[(a*x)^(m - 1)*(-1 + x^2)^((n - 1)/2), x], x, Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n -
1)/2] &&  !(IntegerQ[m/2] && LtQ[0, m, n + 1])

Rule 2611

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(a*Sec[e
+ f*x])^m*(b*Tan[e + f*x])^(n - 1))/(f*(m + n - 1)), x] - Dist[(b^2*(n - 1))/(m + n - 1), Int[(a*Sec[e + f*x])
^m*(b*Tan[e + f*x])^(n - 2), x], x] /; FreeQ[{a, b, e, f, m}, x] && GtQ[n, 1] && NeQ[m + n - 1, 0] && Integers
Q[2*m, 2*n]

Rule 3107

Int[cos[(c_.) + (d_.)*(x_)]^(m_.)*sin[(c_.) + (d_.)*(x_)]^(n_.)*(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_
.) + (d_.)*(x_)])^(p_.), x_Symbol] :> Int[ExpandTrig[cos[c + d*x]^m*sin[c + d*x]^n*(a*cos[c + d*x] + b*sin[c +
 d*x])^p, x], x] /; FreeQ[{a, b, c, d, m, n}, x] && IGtQ[p, 0]

Rule 3108

Int[cos[(c_.) + (d_.)*(x_)]^(m_.)*sin[(c_.) + (d_.)*(x_)]^(n_.)*(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_
.) + (d_.)*(x_)])^(p_), x_Symbol] :> Dist[a^p*b^p, Int[(Cos[c + d*x]^m*Sin[c + d*x]^n)/(b*Cos[c + d*x] + a*Sin
[c + d*x])^p, x], x] /; FreeQ[{a, b, c, d, m, n}, x] && EqQ[a^2 + b^2, 0] && ILtQ[p, 0]

Rule 3518

Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Int[(Sin[e + f*x]
^m*(a*Cos[e + f*x] + b*Sin[e + f*x])^n)/Cos[e + f*x]^n, x] /; FreeQ[{a, b, e, f}, x] && IntegerQ[(m - 1)/2] &&
 ILtQ[n, 0] && ((LtQ[m, 5] && GtQ[n, -4]) || (EqQ[m, 5] && EqQ[n, -1]))

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin {align*} \int \frac {\sec ^3(x)}{i+\cot (x)} \, dx &=-\int \frac {\sec ^2(x) \tan (x)}{-\cos (x)-i \sin (x)} \, dx\\ &=i \int \sec ^2(x) (-i \cos (x)-\sin (x)) \tan (x) \, dx\\ &=i \int \left (-i \sec (x) \tan (x)-\sec (x) \tan ^2(x)\right ) \, dx\\ &=-\left (i \int \sec (x) \tan ^2(x) \, dx\right )+\int \sec (x) \tan (x) \, dx\\ &=-\frac {1}{2} i \sec (x) \tan (x)+\frac {1}{2} i \int \sec (x) \, dx+\operatorname {Subst}(\int 1 \, dx,x,\sec (x))\\ &=\frac {1}{2} i \tanh ^{-1}(\sin (x))+\sec (x)-\frac {1}{2} i \sec (x) \tan (x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [B]  time = 0.15, size = 48, normalized size = 2.18 \[ -\frac {1}{2} i \left ((\tan (x)+2 i) \sec (x)+\log \left (\cos \left (\frac {x}{2}\right )-\sin \left (\frac {x}{2}\right )\right )-\log \left (\sin \left (\frac {x}{2}\right )+\cos \left (\frac {x}{2}\right )\right )\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[x]^3/(I + Cot[x]),x]

[Out]

(-1/2*I)*(Log[Cos[x/2] - Sin[x/2]] - Log[Cos[x/2] + Sin[x/2]] + Sec[x]*(2*I + Tan[x]))

________________________________________________________________________________________

fricas [B]  time = 0.62, size = 73, normalized size = 3.32 \[ \frac {{\left (i \, e^{\left (4 i \, x\right )} + 2 i \, e^{\left (2 i \, x\right )} + i\right )} \log \left (e^{\left (i \, x\right )} + i\right ) + {\left (-i \, e^{\left (4 i \, x\right )} - 2 i \, e^{\left (2 i \, x\right )} - i\right )} \log \left (e^{\left (i \, x\right )} - i\right ) + 2 \, e^{\left (3 i \, x\right )} + 6 \, e^{\left (i \, x\right )}}{2 \, {\left (e^{\left (4 i \, x\right )} + 2 \, e^{\left (2 i \, x\right )} + 1\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)^3/(I+cot(x)),x, algorithm="fricas")

[Out]

1/2*((I*e^(4*I*x) + 2*I*e^(2*I*x) + I)*log(e^(I*x) + I) + (-I*e^(4*I*x) - 2*I*e^(2*I*x) - I)*log(e^(I*x) - I)
+ 2*e^(3*I*x) + 6*e^(I*x))/(e^(4*I*x) + 2*e^(2*I*x) + 1)

________________________________________________________________________________________

giac [B]  time = 0.41, size = 55, normalized size = 2.50 \[ -\frac {i \, \tan \left (\frac {1}{2} \, x\right )^{3} + 2 \, \tan \left (\frac {1}{2} \, x\right )^{2} + i \, \tan \left (\frac {1}{2} \, x\right ) - 2}{{\left (\tan \left (\frac {1}{2} \, x\right )^{2} - 1\right )}^{2}} + \frac {1}{2} i \, \log \left (\tan \left (\frac {1}{2} \, x\right ) + 1\right ) - \frac {1}{2} i \, \log \left (\tan \left (\frac {1}{2} \, x\right ) - 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)^3/(I+cot(x)),x, algorithm="giac")

[Out]

-(I*tan(1/2*x)^3 + 2*tan(1/2*x)^2 + I*tan(1/2*x) - 2)/(tan(1/2*x)^2 - 1)^2 + 1/2*I*log(tan(1/2*x) + 1) - 1/2*I
*log(tan(1/2*x) - 1)

________________________________________________________________________________________

maple [B]  time = 0.39, size = 84, normalized size = 3.82 \[ -\frac {i \ln \left (\tan \left (\frac {x}{2}\right )-1\right )}{2}-\frac {i}{2 \left (\tan \left (\frac {x}{2}\right )-1\right )^{2}}-\frac {1}{\tan \left (\frac {x}{2}\right )-1}-\frac {i}{2 \left (\tan \left (\frac {x}{2}\right )-1\right )}+\frac {i}{2 \left (\tan \left (\frac {x}{2}\right )+1\right )^{2}}+\frac {i \ln \left (\tan \left (\frac {x}{2}\right )+1\right )}{2}+\frac {1}{\tan \left (\frac {x}{2}\right )+1}-\frac {i}{2 \left (\tan \left (\frac {x}{2}\right )+1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(x)^3/(I+cot(x)),x)

[Out]

-1/2*I*ln(tan(1/2*x)-1)-1/2*I/(tan(1/2*x)-1)^2-1/(tan(1/2*x)-1)-1/2*I/(tan(1/2*x)-1)+1/2*I/(tan(1/2*x)+1)^2+1/
2*I*ln(tan(1/2*x)+1)+1/(tan(1/2*x)+1)-1/2*I/(tan(1/2*x)+1)

________________________________________________________________________________________

maxima [B]  time = 0.48, size = 94, normalized size = 4.27 \[ \frac {\frac {i \, \sin \relax (x)}{\cos \relax (x) + 1} + \frac {2 \, \sin \relax (x)^{2}}{{\left (\cos \relax (x) + 1\right )}^{2}} + \frac {i \, \sin \relax (x)^{3}}{{\left (\cos \relax (x) + 1\right )}^{3}} - 2}{\frac {2 \, \sin \relax (x)^{2}}{{\left (\cos \relax (x) + 1\right )}^{2}} - \frac {\sin \relax (x)^{4}}{{\left (\cos \relax (x) + 1\right )}^{4}} - 1} + \frac {1}{2} i \, \log \left (\frac {\sin \relax (x)}{\cos \relax (x) + 1} + 1\right ) - \frac {1}{2} i \, \log \left (\frac {\sin \relax (x)}{\cos \relax (x) + 1} - 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)^3/(I+cot(x)),x, algorithm="maxima")

[Out]

(I*sin(x)/(cos(x) + 1) + 2*sin(x)^2/(cos(x) + 1)^2 + I*sin(x)^3/(cos(x) + 1)^3 - 2)/(2*sin(x)^2/(cos(x) + 1)^2
 - sin(x)^4/(cos(x) + 1)^4 - 1) + 1/2*I*log(sin(x)/(cos(x) + 1) + 1) - 1/2*I*log(sin(x)/(cos(x) + 1) - 1)

________________________________________________________________________________________

mupad [B]  time = 0.30, size = 47, normalized size = 2.14 \[ \mathrm {atanh}\left (\mathrm {tan}\left (\frac {x}{2}\right )\right )\,1{}\mathrm {i}-\frac {{\mathrm {tan}\left (\frac {x}{2}\right )}^3\,1{}\mathrm {i}+2\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2+\mathrm {tan}\left (\frac {x}{2}\right )\,1{}\mathrm {i}-2}{{\left ({\mathrm {tan}\left (\frac {x}{2}\right )}^2-1\right )}^2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(cos(x)^3*(cot(x) + 1i)),x)

[Out]

atanh(tan(x/2))*1i - (tan(x/2)*1i + 2*tan(x/2)^2 + tan(x/2)^3*1i - 2)/(tan(x/2)^2 - 1)^2

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\sec ^{3}{\relax (x )}}{\cot {\relax (x )} + i}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)**3/(I+cot(x)),x)

[Out]

Integral(sec(x)**3/(cot(x) + I), x)

________________________________________________________________________________________